# -*- coding: utf-8 -*-
# @Time        :2025/4/17 9:41
# @Author      :文刀水寿
# @File        : 04_路径操作装饰器方法.py
"""
 @Description :
"""
from fastapi import FastAPI
import uvicorn

app = FastAPI()


@app.get("/get")
async def get_test():
    return {"method": "get方法"}


@app.post("/post")
async def post_test():
    return {"method": "post方法"}


@app.put("/put")
async def put_test():
    return {"method": "put方法"}


@app.delete("/delete")
async def delete_test():
    return {"method": "delete方法"}


@app.patch("/patch")
async def patch_test():
    return {"method": "patch方法"}


@app.options("/options")
async def options_test():
    return {"method": "options方法"}


@app.head("/head")
async def head_test():
    return {"method": "head方法"}


@app.trace("/trace")
async def trace_test():
    return {"method": "trace方法"}


if __name__ == '__main__':
    uvicorn.run("04_路径操作装饰器方法:app",
                port=8080,
                reload=True)
